//
//  CMDBLabelView.swift
//  CMDB
//
//  Created by 王磊 on 17/4/12.
//  Copyright © 2017年 CMDB. All rights reserved.
//

import UIKit

class CMDBLabelCollectionView: UICollectionView {
    
    private var cmdbDataArray: Array<AnyObject> = []
    
    override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
        super.init(frame: frame, collectionViewLayout: layout)
        
        commitInit()
        
        regCollectionViewCell()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
extension CMDBLabelCollectionView {
    
    func commitInit() {
        
        bounces = false
        
        showsVerticalScrollIndicator = false
        
        showsHorizontalScrollIndicator = false
        
        dataSource = self
        
        delegate = self
    }
    func regCollectionViewCell() {
        
        registerClass(CMDBLabelCollectionViewCell.self, forCellWithReuseIdentifier: "CMDBLabelCollectionViewCell")
    }
}
extension CMDBLabelCollectionView: UICollectionViewDataSource {}

extension CMDBLabelCollectionView {
    
    func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
        
        return 1
    }
    func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        
        return cmdbDataArray.count
    }
    func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
        
        let cell = collectionView.dequeueReusableCellWithReuseIdentifier("CMDBLabelCollectionViewCell", forIndexPath: indexPath)
        
        
        
        
        return cell
    }
}


extension CMDBLabelCollectionView: UICollectionViewDelegate {}